import React from 'react';
import intl from "../utils/intl";
import { componentMapCustomizeBuilder } from "../utils/customize/helpers";
/**
 * LowCode 组件没有加载成功
 * @param componentCode
 * @returns {*}
 * @constructor
 */

function LowCodeComponentNotLoad(_ref) {
  var componentCode = _ref.componentCode;
  return /*#__PURE__*/React.createElement("div", null, intl.get('cpaas.common.error.message.lowCodeComponentLoadError', {
    componentCode: componentCode
  }).d("low-code <".concat(componentCode, " /> \u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25")));
}
/**
 * LowCode 组件加载中
 * @returns {null}
 * @constructor
 */


function LowCodeComponentLoading() {
  return null; // return (
  //   <div>
  //     {intl
  //       .get('cpaas.common.error.message.componentLoading', { componentCode })
  //       .d(`low-code <${componentCode} /> 正在加载中`)}
  //   </div>
  // );
}

var _componentMapCustomiz = componentMapCustomizeBuilder('clcd', 'component', {
  NotFound: LowCodeComponentNotLoad,
  Loading: LowCodeComponentLoading
}),
    setComponent = _componentMapCustomiz.setComponent,
    SharedComponent = _componentMapCustomiz.SharedComponent;

export { setComponent, SharedComponent as LowCodeSharedComponent };